package org.jsping.util;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

public class RedisUtil {
	
	private static JedisPool jedispool = null;
	static {
		jedispool = new JedisPool(new JedisPoolConfig(),"127.0.0.1",6379,60*60,"123456");
	}
	
	public static Jedis getJedis() {
		Jedis s = jedispool.getResource();
		return s;
	}
	
	public static void closeJedis(final Jedis jedis) {
		jedis.close();
	}
}
